<?php namespace Home\Model;
use Hdphp\Model\Model;
class Reg extends Model{
//指定表名
    protected $table = "user";
//  错误提示    
    protected $validate = array(
        array("username","minlen:4,maxlen:20","最少4个字符，请输入您的用户名",3,3),
		array("password","minlen:6,maxlen:20","密码长度6-20个字符，请重新输入",3,3),
		array("telphone","tel","固定电话格式不正确，请重新输入",3,2),
		array("cellphone","phone","手机号格式不正确，请重新输入",3,2),
		array("email","email","邮箱格式不正确，请重新输入",3,3),
    );
	
//  添加
    public function store(){
        if(!$this->create()) return FALSE;
        $this->add();
        return TRUE;
    }
}